/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80028
 Source Host           : 127.0.0.1:3306
 Source Schema         : erp_db

 Target Server Type    : MySQL
 Target Server Version : 80028
 File Encoding         : 65001

 Date: 17/05/2024 13:34:15
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for D_CONFIG_FILE_KIND
-- ----------------------------
DROP TABLE IF EXISTS `D_CONFIG_FILE_KIND`;
CREATE TABLE `D_CONFIG_FILE_KIND` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `P_ID` int DEFAULT NULL,
  `KIND_ID` varchar(20) NOT NULL,
  `KIND_NAME` varchar(50) NOT NULL,
  `KIND_LEVEL` int DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of D_CONFIG_FILE_KIND
-- ----------------------------
BEGIN;
INSERT INTO `D_CONFIG_FILE_KIND` (`ID`, `P_ID`, `KIND_ID`, `KIND_NAME`, `KIND_LEVEL`) VALUES (1, NULL, '01', '电子', 1);
INSERT INTO `D_CONFIG_FILE_KIND` (`ID`, `P_ID`, `KIND_ID`, `KIND_NAME`, `KIND_LEVEL`) VALUES (2, 1, '01', '计算机', 2);
INSERT INTO `D_CONFIG_FILE_KIND` (`ID`, `P_ID`, `KIND_ID`, `KIND_NAME`, `KIND_LEVEL`) VALUES (3, 2, '01', '服务器', 3);
INSERT INTO `D_CONFIG_FILE_KIND` (`ID`, `P_ID`, `KIND_ID`, `KIND_NAME`, `KIND_LEVEL`) VALUES (4, 1, '02', '平板电脑', 2);
INSERT INTO `D_CONFIG_FILE_KIND` (`ID`, `P_ID`, `KIND_ID`, `KIND_NAME`, `KIND_LEVEL`) VALUES (5, 1, '03', '移动电话', 2);
INSERT INTO `D_CONFIG_FILE_KIND` (`ID`, `P_ID`, `KIND_ID`, `KIND_NAME`, `KIND_LEVEL`) VALUES (6, 2, '02', '笔记本', 3);
COMMIT;

-- ----------------------------
-- Table structure for D_FILE
-- ----------------------------
DROP TABLE IF EXISTS `D_FILE`;
CREATE TABLE `D_FILE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) NOT NULL,
  `FACTORY_NAME` varchar(50) DEFAULT NULL,
  `FIRST_KIND_ID` varchar(20) DEFAULT NULL,
  `FIRST_KIND_NAME` varchar(50) DEFAULT NULL,
  `SECOND_KIND_ID` varchar(20) DEFAULT NULL,
  `SECOND_KIND_NAME` varchar(50) DEFAULT NULL,
  `THIRD_KIND_ID` varchar(20) DEFAULT NULL,
  `THIRD_KIND_NAME` varchar(50) DEFAULT NULL,
  `PRODUCT_NICK` varchar(50) DEFAULT NULL,
  `TYPE` varchar(20) DEFAULT NULL,
  `PRODUCT_CLASS` varchar(20) DEFAULT NULL,
  `PERSONAL_UNIT` varchar(20) DEFAULT NULL,
  `PERSONAL_VALUE` varchar(20) DEFAULT NULL,
  `PROVIDER_GROUP` varchar(400) DEFAULT NULL,
  `WARRANTY` varchar(20) DEFAULT NULL,
  `TWIN_NAME` varchar(50) DEFAULT NULL,
  `TWIN_ID` varchar(50) DEFAULT NULL,
  `LIFECYCLE` varchar(50) DEFAULT NULL,
  `LIST_PRICE` decimal(12,2) NOT NULL,
  `COST_PRICE` decimal(12,2) NOT NULL,
  `REAL_COST_PRICE` decimal(12,2) DEFAULT NULL,
  `AMOUNT_UNIT` varchar(20) DEFAULT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `RESPONSIBLE_PERSON` varchar(50) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `CHANGER` varchar(50) DEFAULT NULL,
  `CHANGE_TIME` datetime DEFAULT NULL,
  `CHANGE_TAG` varchar(20) NOT NULL,
  `PRICE_CHANGE_TAG` varchar(20) NOT NULL,
  `FILE_CHANGE_AMOUNT` int DEFAULT NULL,
  `DELETE_TAG` varchar(20) NOT NULL,
  `DESIGN_MODULE_TAG` varchar(20) NOT NULL,
  `DESIGN_PROCEDURE_TAG` varchar(20) NOT NULL,
  `DESIGN_CELL_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of D_FILE
-- ----------------------------
BEGIN;
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (1, '100010101000001', '戴尔笔记本电脑', '戴尔', '01', '电子', '01', '计算机', '01', '服务器', NULL, 'Y001-1', 'D001-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10000.00, 10000.00, 6000.00, NULL, NULL, NULL, 'aa', '2024-01-25 00:51:51', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (2, '100010101000002', '联想笔记本电脑', '联想', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-1', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 8000.00, 5000.00, NULL, '', '\r\n                            ', '', '', NULL, NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-1', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (3, '100010101000003', '苹果笔记本电脑', '苹果', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-1', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 20000.00, 10000.00, NULL, '', '\r\n                            ', '', '', '2024-02-23 16:08:39', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-1', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (4, '100010101000004', '苹果物料1', '苹果', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 3000.00, 1000.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:17:31', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (5, '100010101000005', '苹果物料2', '苹果', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 2000.00, 1000.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:18:01', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (6, '100010101000006', '苹果物料3', '苹果', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 1000.00, 500.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:18:13', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (7, '100010101000007', '联想物料1', '联想', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 3000.00, 2000.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:19:00', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (8, '100010101000008', '联想物料2', '联想', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 2000.00, 1000.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:19:08', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (9, '100010101000009', '联想物料3', '联想', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 1000.00, 800.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:19:16', NULL, NULL, 'S001-1', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (10, '100010101000010', '戴尔物料1', '戴尔', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 4000.00, 2000.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:19:29', NULL, NULL, 'S001-0', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (11, '100010101000011', '戴尔物料2', '戴尔', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 2000.00, 1000.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:19:36', NULL, NULL, 'S001-0', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
INSERT INTO `D_FILE` (`ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FACTORY_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `PRODUCT_NICK`, `TYPE`, `PRODUCT_CLASS`, `PERSONAL_UNIT`, `PERSONAL_VALUE`, `PROVIDER_GROUP`, `WARRANTY`, `TWIN_NAME`, `TWIN_ID`, `LIFECYCLE`, `LIST_PRICE`, `COST_PRICE`, `REAL_COST_PRICE`, `AMOUNT_UNIT`, `PRODUCT_DESCRIBE`, `RESPONSIBLE_PERSON`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHECK_TAG`, `CHANGER`, `CHANGE_TIME`, `CHANGE_TAG`, `PRICE_CHANGE_TAG`, `FILE_CHANGE_AMOUNT`, `DELETE_TAG`, `DESIGN_MODULE_TAG`, `DESIGN_PROCEDURE_TAG`, `DESIGN_CELL_TAG`) VALUES (12, '100010101000012', '戴尔物料3', '戴尔', '01', '电子', '01', '计算机', '01', '服务器', '', 'Y001-2', 'D001-1', '', '', '\r\n                            ', '', '', '', '', 1000.00, 600.00, NULL, '', '\r\n                            ', '', '', '2024-02-27 13:19:45', NULL, NULL, 'S001-0', NULL, NULL, 'D002-0', 'J001-0', NULL, 'C001-0', 'W001-0', 'G001-0', 'K001-0');
COMMIT;

-- ----------------------------
-- Table structure for D_MODULE
-- ----------------------------
DROP TABLE IF EXISTS `D_MODULE`;
CREATE TABLE `D_MODULE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `DESIGN_ID` varchar(50) NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `FIRST_KIND_ID` varchar(20) DEFAULT NULL,
  `FIRST_KIND_NAME` varchar(50) DEFAULT NULL,
  `SECOND_KIND_ID` varchar(20) DEFAULT NULL,
  `SECOND_KIND_NAME` varchar(50) DEFAULT NULL,
  `THIRD_KIND_ID` varchar(20) DEFAULT NULL,
  `THIRD_KIND_NAME` varchar(50) DEFAULT NULL,
  `DESIGNER` varchar(50) DEFAULT NULL,
  `MODULE_DESCRIBE` varchar(400) DEFAULT NULL,
  `COST_PRICE_SUM` decimal(12,2) NOT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHANGER` varchar(50) DEFAULT NULL,
  `CHANGE_TIME` datetime DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `CHANGE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of D_MODULE
-- ----------------------------
BEGIN;
INSERT INTO `D_MODULE` (`ID`, `DESIGN_ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `DESIGNER`, `MODULE_DESCRIBE`, `COST_PRICE_SUM`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHANGER`, `CHANGE_TIME`, `CHECK_TAG`, `CHANGE_TAG`) VALUES (1, '200202403060001', '100010101000003', '苹果笔记本电脑', '01', '电子', '01', '计算机', '01', '服务器', 'aa', '', 0.00, 'bb', '2024-03-05 00:00:00', NULL, NULL, NULL, NULL, 'S001-0', 'B002-0');
INSERT INTO `D_MODULE` (`ID`, `DESIGN_ID`, `PRODUCT_ID`, `PRODUCT_NAME`, `FIRST_KIND_ID`, `FIRST_KIND_NAME`, `SECOND_KIND_ID`, `SECOND_KIND_NAME`, `THIRD_KIND_ID`, `THIRD_KIND_NAME`, `DESIGNER`, `MODULE_DESCRIBE`, `COST_PRICE_SUM`, `REGISTER`, `REGISTER_TIME`, `CHECKER`, `CHECK_TIME`, `CHANGER`, `CHANGE_TIME`, `CHECK_TAG`, `CHANGE_TAG`) VALUES (2, '200202403060001', '100010101000002', '联想笔记本电脑', '01', '电子', '01', '计算机', '01', '服务器', '张三', '', 0.00, '张三', '2024-03-06 00:00:00', NULL, NULL, NULL, NULL, 'S001-0', 'B002-0');
COMMIT;

-- ----------------------------
-- Table structure for D_MODULE_DETAILS
-- ----------------------------
DROP TABLE IF EXISTS `D_MODULE_DETAILS`;
CREATE TABLE `D_MODULE_DETAILS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `TYPE` varchar(20) DEFAULT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `AMOUNT_UNIT` varchar(20) DEFAULT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `RESIDUAL_AMOUNT` decimal(12,2) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) NOT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_DM_REFERENCE_DMD` (`PARENT_ID`),
  CONSTRAINT `FK_DM_REFERENCE_DMD` FOREIGN KEY (`PARENT_ID`) REFERENCES `D_MODULE` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of D_MODULE_DETAILS
-- ----------------------------
BEGIN;
INSERT INTO `D_MODULE_DETAILS` (`ID`, `PARENT_ID`, `DETAILS_NUMBER`, `PRODUCT_ID`, `PRODUCT_NAME`, `TYPE`, `PRODUCT_DESCRIBE`, `AMOUNT_UNIT`, `AMOUNT`, `RESIDUAL_AMOUNT`, `COST_PRICE`, `SUBTOTAL`) VALUES (1, 1, 1, '100010101000004', '苹果物料1', 'Y001-2', '\r\n                            ', '', 1.00, 1.00, 1000.00, 1000.00);
INSERT INTO `D_MODULE_DETAILS` (`ID`, `PARENT_ID`, `DETAILS_NUMBER`, `PRODUCT_ID`, `PRODUCT_NAME`, `TYPE`, `PRODUCT_DESCRIBE`, `AMOUNT_UNIT`, `AMOUNT`, `RESIDUAL_AMOUNT`, `COST_PRICE`, `SUBTOTAL`) VALUES (2, 1, 2, '100010101000005', '苹果物料2', 'Y001-2', '\r\n                            ', '', 2.00, 2.00, 1000.00, 2000.00);
INSERT INTO `D_MODULE_DETAILS` (`ID`, `PARENT_ID`, `DETAILS_NUMBER`, `PRODUCT_ID`, `PRODUCT_NAME`, `TYPE`, `PRODUCT_DESCRIBE`, `AMOUNT_UNIT`, `AMOUNT`, `RESIDUAL_AMOUNT`, `COST_PRICE`, `SUBTOTAL`) VALUES (3, 1, 3, '100010101000006', '苹果物料3', 'Y001-2', '\r\n                            ', '', 3.00, 3.00, 500.00, 1500.00);
INSERT INTO `D_MODULE_DETAILS` (`ID`, `PARENT_ID`, `DETAILS_NUMBER`, `PRODUCT_ID`, `PRODUCT_NAME`, `TYPE`, `PRODUCT_DESCRIBE`, `AMOUNT_UNIT`, `AMOUNT`, `RESIDUAL_AMOUNT`, `COST_PRICE`, `SUBTOTAL`) VALUES (4, 2, 1, '100010101000007', '联想物料1', 'Y001-2', '\r\n                            ', '', 2.00, 2.00, 2000.00, 4000.00);
INSERT INTO `D_MODULE_DETAILS` (`ID`, `PARENT_ID`, `DETAILS_NUMBER`, `PRODUCT_ID`, `PRODUCT_NAME`, `TYPE`, `PRODUCT_DESCRIBE`, `AMOUNT_UNIT`, `AMOUNT`, `RESIDUAL_AMOUNT`, `COST_PRICE`, `SUBTOTAL`) VALUES (5, 2, 2, '100010101000008', '联想物料2', 'Y001-2', '\r\n                            ', '', 3.00, 3.00, 1000.00, 3000.00);
INSERT INTO `D_MODULE_DETAILS` (`ID`, `PARENT_ID`, `DETAILS_NUMBER`, `PRODUCT_ID`, `PRODUCT_NAME`, `TYPE`, `PRODUCT_DESCRIBE`, `AMOUNT_UNIT`, `AMOUNT`, `RESIDUAL_AMOUNT`, `COST_PRICE`, `SUBTOTAL`) VALUES (6, 2, 3, '100010101000009', '联想物料3', 'Y001-2', '\r\n                            ', '', 4.00, 4.00, 800.00, 3200.00);
COMMIT;

-- ----------------------------
-- Table structure for D_PROCEDURE
-- ----------------------------
DROP TABLE IF EXISTS `D_PROCEDURE`;
CREATE TABLE `D_PROCEDURE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PROCEDURE_ID` varchar(50) DEFAULT NULL,
  `PROCEDURE_NAME` varchar(50) NOT NULL,
  `PROCEDURE_DESCRIBE` varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of D_PROCEDURE
-- ----------------------------
BEGIN;
INSERT INTO `D_PROCEDURE` (`ID`, `PROCEDURE_ID`, `PROCEDURE_NAME`, `PROCEDURE_DESCRIBE`) VALUES (1, '01', '组装', NULL);
INSERT INTO `D_PROCEDURE` (`ID`, `PROCEDURE_ID`, `PROCEDURE_NAME`, `PROCEDURE_DESCRIBE`) VALUES (2, '02', '测试', NULL);
INSERT INTO `D_PROCEDURE` (`ID`, `PROCEDURE_ID`, `PROCEDURE_NAME`, `PROCEDURE_DESCRIBE`) VALUES (3, '03', '包装', NULL);
COMMIT;

-- ----------------------------
-- Table structure for M_APPLY
-- ----------------------------
DROP TABLE IF EXISTS `M_APPLY`;
CREATE TABLE `M_APPLY` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `APPLY_ID` varchar(50) NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `TYPE` varchar(20) DEFAULT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `DESIGNER` varchar(50) DEFAULT NULL,
  `REMARK` varchar(400) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_SUGGESTION` varchar(400) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `MANUFACTURE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_APPLY
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_DESIGN_PROCEDURE
-- ----------------------------
DROP TABLE IF EXISTS `M_DESIGN_PROCEDURE`;
CREATE TABLE `M_DESIGN_PROCEDURE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `DESIGN_ID` varchar(50) NOT NULL,
  `FIRST_KIND_ID` varchar(20) DEFAULT NULL,
  `FIRST_KIND_NAME` varchar(50) DEFAULT NULL,
  `SECOND_KIND_ID` varchar(20) DEFAULT NULL,
  `SECOND_KIND_NAME` varchar(50) DEFAULT NULL,
  `THIRD_KIND_ID` varchar(20) DEFAULT NULL,
  `THIRD_KIND_NAME` varchar(50) DEFAULT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `PROCEDURE_DESCRIBE` varchar(400) DEFAULT NULL,
  `COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `MODULE_COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `DESIGNER` varchar(50) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHECK_SUGGESTION` varchar(400) DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `CHANGER` varchar(50) DEFAULT NULL,
  `CHANGE_TIME` datetime DEFAULT NULL,
  `CHANGE_TAG` varchar(20) NOT NULL,
  `DESIGN_MODULE_TAG` varchar(20) NOT NULL,
  `DESIGN_MODULE_CHANGE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_DESIGN_PROCEDURE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_DESIGN_PROCEDURE_DETAILS
-- ----------------------------
DROP TABLE IF EXISTS `M_DESIGN_PROCEDURE_DETAILS`;
CREATE TABLE `M_DESIGN_PROCEDURE_DETAILS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PROCEDURE_ID` varchar(50) NOT NULL,
  `PROCEDURE_NAME` varchar(50) DEFAULT NULL,
  `LABOUR_HOUR_AMOUNT` decimal(12,2) NOT NULL,
  `PROCEDURE_DESCRIBE` varchar(400) DEFAULT NULL,
  `AMOUNT_UNIT` varchar(20) NOT NULL,
  `COST_PRICE` decimal(12,2) NOT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `MODULE_SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `DESIGN_MODULE_TAG` varchar(20) NOT NULL,
  `DESIGN_MODULE_CHANGE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_MDP_REFERENCE_MDPD` (`PARENT_ID`),
  CONSTRAINT `FK_MDP_REFERENCE_MDPD` FOREIGN KEY (`PARENT_ID`) REFERENCES `M_DESIGN_PROCEDURE` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_DESIGN_PROCEDURE_DETAILS
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_DESIGN_PROCEDURE_MODULE
-- ----------------------------
DROP TABLE IF EXISTS `M_DESIGN_PROCEDURE_MODULE`;
CREATE TABLE `M_DESIGN_PROCEDURE_MODULE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `TYPE` varchar(20) DEFAULT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `AMOUNT_UNIT` varchar(20) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) NOT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_MDPD_REFERENCE_MDPMD` (`PARENT_ID`),
  CONSTRAINT `FK_MDPD_REFERENCE_MDPMD` FOREIGN KEY (`PARENT_ID`) REFERENCES `M_DESIGN_PROCEDURE_DETAILS` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_DESIGN_PROCEDURE_MODULE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_MANUFACTURE
-- ----------------------------
DROP TABLE IF EXISTS `M_MANUFACTURE`;
CREATE TABLE `M_MANUFACTURE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `MANUFACTURE_ID` varchar(50) NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `TESTED_AMOUNT` decimal(12,2) DEFAULT NULL,
  `APPLY_ID_GROUP` varchar(400) NOT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `MODULE_COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `REAL_MODULE_COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `LABOUR_COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `REAL_LABOUR_COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `DESIGNER` varchar(50) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `REMARK` varchar(400) DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `MANUFACTURE_PROCEDURE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_MANUFACTURE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_PROCEDURE
-- ----------------------------
DROP TABLE IF EXISTS `M_PROCEDURE`;
CREATE TABLE `M_PROCEDURE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PROCEDURE_ID` varchar(50) NOT NULL,
  `PROCEDURE_NAME` varchar(50) DEFAULT NULL,
  `LABOUR_HOUR_AMOUNT` decimal(12,2) DEFAULT NULL,
  `REAL_LABOUR_HOUR_AMOUNT` decimal(12,2) DEFAULT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `REAL_SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `MODULE_SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `REAL_MODULE_SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) DEFAULT NULL,
  `DEMAND_AMOUNT` decimal(12,2) DEFAULT NULL,
  `REAL_AMOUNT` decimal(12,2) DEFAULT NULL,
  `PROCEDURE_FINISH_TAG` varchar(20) NOT NULL,
  `PROCEDURE_TRANSFER_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_MM_REFERENCE_MP1` (`PARENT_ID`),
  CONSTRAINT `FK_MM_REFERENCE_MP1` FOREIGN KEY (`PARENT_ID`) REFERENCES `M_MANUFACTURE` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_PROCEDURE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_PROCEDURE_MODULE
-- ----------------------------
DROP TABLE IF EXISTS `M_PROCEDURE_MODULE`;
CREATE TABLE `M_PROCEDURE_MODULE` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) DEFAULT NULL,
  `AMOUNT` decimal(12,2) DEFAULT NULL,
  `RENEW_AMOUNT` decimal(12,2) DEFAULT NULL,
  `REAL_AMOUNT` decimal(12,2) DEFAULT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `REAL_SUBTOTAL` decimal(12,2) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_MP_REFERENCE_MPM` (`PARENT_ID`),
  CONSTRAINT `FK_MP_REFERENCE_MPM` FOREIGN KEY (`PARENT_ID`) REFERENCES `M_PROCEDURE` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_PROCEDURE_MODULE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_PROCEDURE_MODULING
-- ----------------------------
DROP TABLE IF EXISTS `M_PROCEDURE_MODULING`;
CREATE TABLE `M_PROCEDURE_MODULING` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) DEFAULT NULL,
  `AMOUNT` decimal(12,2) DEFAULT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_MP_REFERENCE_MPM2` (`PARENT_ID`),
  CONSTRAINT `FK_MP_REFERENCE_MPM2` FOREIGN KEY (`PARENT_ID`) REFERENCES `M_PROCEDURING` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_PROCEDURE_MODULING
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for M_PROCEDURING
-- ----------------------------
DROP TABLE IF EXISTS `M_PROCEDURING`;
CREATE TABLE `M_PROCEDURING` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `DETAILS_NUMBER` int NOT NULL,
  `PROCEDURE_ID` varchar(50) NOT NULL,
  `PROCEDURE_NAME` varchar(50) DEFAULT NULL,
  `LABOUR_HOUR_AMOUNT` decimal(12,2) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) DEFAULT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `PROCEDURE_DESCRIBE` varchar(400) DEFAULT NULL,
  `REG_COUNT` decimal(12,2) NOT NULL,
  `PROCEDURE_RESPONSIBLE_PERSON` varchar(50) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_MM_REFERENCE_MP2` (`PARENT_ID`),
  CONSTRAINT `FK_MM_REFERENCE_MP2` FOREIGN KEY (`PARENT_ID`) REFERENCES `M_MANUFACTURE` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of M_PROCEDURING
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for S_CELL
-- ----------------------------
DROP TABLE IF EXISTS `S_CELL`;
CREATE TABLE `S_CELL` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `STORE_ID` varchar(50) NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `FIRST_KIND_ID` varchar(20) DEFAULT NULL,
  `FIRST_KIND_NAME` varchar(50) DEFAULT NULL,
  `SECOND_KIND_ID` varchar(20) DEFAULT NULL,
  `SECOND_KIND_NAME` varchar(50) DEFAULT NULL,
  `THIRD_KIND_ID` varchar(20) DEFAULT NULL,
  `THIRD_KIND_NAME` varchar(50) DEFAULT NULL,
  `MIN_AMOUNT` decimal(12,2) NOT NULL,
  `MAX_AMOUNT` decimal(12,2) NOT NULL,
  `MAX_CAPACITY_AMOUNT` decimal(12,2) NOT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `CONFIG` varchar(400) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHECK_TAG` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of S_CELL
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for S_GATHER
-- ----------------------------
DROP TABLE IF EXISTS `S_GATHER`;
CREATE TABLE `S_GATHER` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `GATHER_ID` varchar(50) NOT NULL,
  `STORER` varchar(50) DEFAULT NULL,
  `REASON` varchar(20) NOT NULL,
  `REASONEXACT` varchar(50) DEFAULT NULL,
  `AMOUNT_SUM` decimal(12,2) DEFAULT NULL,
  `COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `GATHERED_AMOUNT_SUM` decimal(12,2) DEFAULT NULL,
  `REMARK` varchar(400) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `ATTEMPER` varchar(50) DEFAULT NULL,
  `ATTEMPER_TIME` datetime DEFAULT NULL,
  `STORE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of S_GATHER
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for S_GATHER_DETAILS
-- ----------------------------
DROP TABLE IF EXISTS `S_GATHER_DETAILS`;
CREATE TABLE `S_GATHER_DETAILS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `AMOUNT_UNIT` varchar(20) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) DEFAULT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `GATHERED_AMOUNT` decimal(12,2) DEFAULT NULL,
  `GATHER_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_SG_REFERENCE_SGD` (`PARENT_ID`),
  CONSTRAINT `FK_SG_REFERENCE_SGD` FOREIGN KEY (`PARENT_ID`) REFERENCES `S_GATHER` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of S_GATHER_DETAILS
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for S_PAY
-- ----------------------------
DROP TABLE IF EXISTS `S_PAY`;
CREATE TABLE `S_PAY` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PAY_ID` varchar(50) NOT NULL,
  `STORER` varchar(50) DEFAULT NULL,
  `REASON` varchar(20) NOT NULL,
  `REASONEXACT` varchar(50) DEFAULT NULL,
  `AMOUNT_SUM` decimal(12,2) NOT NULL,
  `COST_PRICE_SUM` decimal(12,2) DEFAULT NULL,
  `PAID_AMOUNT_SUM` decimal(12,2) DEFAULT NULL,
  `REMARK` varchar(400) DEFAULT NULL,
  `REGISTER` varchar(50) DEFAULT NULL,
  `REGISTER_TIME` datetime DEFAULT NULL,
  `CHECKER` varchar(50) DEFAULT NULL,
  `CHECK_TIME` datetime DEFAULT NULL,
  `CHECK_TAG` varchar(20) NOT NULL,
  `ATTEMPER` varchar(50) DEFAULT NULL,
  `ATTEMPER_TIME` datetime DEFAULT NULL,
  `STORE_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of S_PAY
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for S_PAY_DETAILS
-- ----------------------------
DROP TABLE IF EXISTS `S_PAY_DETAILS`;
CREATE TABLE `S_PAY_DETAILS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int NOT NULL,
  `PRODUCT_ID` varchar(50) NOT NULL,
  `PRODUCT_NAME` varchar(50) DEFAULT NULL,
  `PRODUCT_DESCRIBE` varchar(400) DEFAULT NULL,
  `AMOUNT` decimal(12,2) NOT NULL,
  `AMOUNT_UNIT` varchar(20) DEFAULT NULL,
  `COST_PRICE` decimal(12,2) DEFAULT NULL,
  `SUBTOTAL` decimal(12,2) DEFAULT NULL,
  `PAID_AMOUNT` decimal(12,2) DEFAULT NULL,
  `PAY_TAG` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_SP_REFERENCE_SPD` (`PARENT_ID`),
  CONSTRAINT `FK_SP_REFERENCE_SPD` FOREIGN KEY (`PARENT_ID`) REFERENCES `S_PAY` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of S_PAY_DETAILS
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_CODES
-- ----------------------------
DROP TABLE IF EXISTS `SYS_CODES`;
CREATE TABLE `SYS_CODES` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int DEFAULT NULL,
  `CODE_ID` varchar(20) DEFAULT NULL,
  `NAME` varchar(50) DEFAULT NULL,
  `STATUS` varchar(20) DEFAULT NULL,
  `DEF_VALUE` varchar(20) DEFAULT NULL,
  `DESCN` varchar(400) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_Reference_6` (`PARENT_ID`),
  CONSTRAINT `FK_Reference_6` FOREIGN KEY (`PARENT_ID`) REFERENCES `SYS_CODES` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_CODES
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_LOGS
-- ----------------------------
DROP TABLE IF EXISTS `SYS_LOGS`;
CREATE TABLE `SYS_LOGS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `LOGIN_ID` varchar(50) DEFAULT NULL,
  `PRIORITY` varchar(200) DEFAULT NULL,
  `LOG_DATE` datetime DEFAULT NULL,
  `CLASS_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `METHOD` varchar(200) DEFAULT NULL,
  `MSG` varchar(400) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_LOGS
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_MENU_ROLE
-- ----------------------------
DROP TABLE IF EXISTS `SYS_MENU_ROLE`;
CREATE TABLE `SYS_MENU_ROLE` (
  `MENU_ID` int DEFAULT NULL,
  `ROLE_ID` int DEFAULT NULL,
  KEY `FK_SYS_MENU_REFERENCE_SYS_MENU_ROLE` (`MENU_ID`),
  KEY `FK_Reference_23` (`ROLE_ID`),
  CONSTRAINT `FK_Reference_23` FOREIGN KEY (`ROLE_ID`) REFERENCES `SYS_ROLES` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `FK_SYS_MENU_REFERENCE_SYS_MENU_ROLE` FOREIGN KEY (`MENU_ID`) REFERENCES `SYS_MENUS` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_MENU_ROLE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_MENUS
-- ----------------------------
DROP TABLE IF EXISTS `SYS_MENUS`;
CREATE TABLE `SYS_MENUS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `PARENT_ID` int DEFAULT NULL,
  `SEQ` int DEFAULT NULL,
  `NAME` varchar(50) DEFAULT NULL,
  `TIP` varchar(200) DEFAULT NULL,
  `DESCN` varchar(400) DEFAULT NULL,
  `IMAGE_URL` varchar(200) DEFAULT NULL,
  `LINK_URL` varchar(200) DEFAULT NULL,
  `TARGET` varchar(200) DEFAULT NULL,
  `STATUS` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK_Reference_7` (`PARENT_ID`),
  CONSTRAINT `FK_Reference_7` FOREIGN KEY (`PARENT_ID`) REFERENCES `SYS_MENUS` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_MENUS
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_ROLES
-- ----------------------------
DROP TABLE IF EXISTS `SYS_ROLES`;
CREATE TABLE `SYS_ROLES` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `NAME` varchar(50) DEFAULT NULL,
  `CODE` varchar(50) DEFAULT NULL,
  `DESCN` varchar(400) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_ROLES
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_USER_ROLE
-- ----------------------------
DROP TABLE IF EXISTS `SYS_USER_ROLE`;
CREATE TABLE `SYS_USER_ROLE` (
  `USER_ID` int DEFAULT NULL,
  `ROLE_ID` int DEFAULT NULL,
  KEY `FK_Reference_24` (`ROLE_ID`),
  KEY `FK_Reference_25` (`USER_ID`),
  CONSTRAINT `FK_Reference_24` FOREIGN KEY (`ROLE_ID`) REFERENCES `SYS_ROLES` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `FK_Reference_25` FOREIGN KEY (`USER_ID`) REFERENCES `SYS_USERS` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_USER_ROLE
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for SYS_USERS
-- ----------------------------
DROP TABLE IF EXISTS `SYS_USERS`;
CREATE TABLE `SYS_USERS` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `LOGIN_ID` varchar(50) DEFAULT NULL,
  `PASSWORD` varchar(50) DEFAULT NULL,
  `STATUS` varchar(20) DEFAULT NULL,
  `PHOTO_PATH` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of SYS_USERS
-- ----------------------------
BEGIN;
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (13, 'admin', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/7f74f819-e47d-4152-91ac-85d75a7d19c2_.jpeg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (14, 'aa1', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/0f0e2d11-c55b-4113-b355-ae9584fdf042_.jpg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (16, 'aa2', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/b18dad6f-d2e3-4b8a-b9d9-97fca3e55fe9_.jpg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (17, 'aa3', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/160cc89d-a754-459c-b587-e442822a663e_.jpg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (18, 'aa4', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/375758ba-109b-405e-af7a-515eab4dd6ff_.jpg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (19, 'aa5', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/8cd6ebfa-0912-4757-b5f4-b36f14164f47_.jpg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (22, 'monkey1', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/77acb96b-cb59-4310-9461-50b6689b6ebb_.jpg');
INSERT INTO `SYS_USERS` (`ID`, `LOGIN_ID`, `PASSWORD`, `STATUS`, `PHOTO_PATH`) VALUES (24, 'monkey2', '123456', '1', 'http://127.0.0.1:10001/images/sysusers/1aab6771-6b5a-420b-8732-5f7e7a1272ac_.jpg');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
